package Algorithm.RandomRollCallDevice;

import java.util.Random;

public class Second {
    public static void main(String[] args) {
        for (int i = 0; i < 10; i++) {
            randomRollCall();
        }
    }

    public static void randomRollCall() {
        Random rand = new Random();
        String[] male = {"Jack", "Mick", "Black", "Marks", "Jon", "Nick"};
        String[] female = {"Alic", "Alma", "Alva"};
        int num = rand.nextInt(10);
        System.out.println(num);
        if (num <= 7) {
            int maleIndex = rand.nextInt(male.length);
            System.out.print(male[maleIndex] + " ");
        } else {
            int femaleIndex = rand.nextInt(female.length);
            System.out.print(female[femaleIndex] + " ");
        }
        System.out.println();
    }
}
